package cn.getech.data.development.mapper;


import cn.getech.data.development.entity.ProcInfo;
import cn.getech.data.development.model.res.procinfo.ProcInfoListRes;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 项目信息表 Mapper 接口
 * </p>
 *
 * @author zenith
 * @since 2018-08-21
 */
@Mapper
public interface ProcInfoMapper extends BaseMapper<ProcInfo> {
    List<ProcInfoListRes> selectProcOwer(Map<String, Object> params);

    Integer selectProcOwerCount(Map<String, Object> params);

    IPage<ProcInfo> selectListPage(Page<ProcInfo> page, @Param("params") Map<String, Object> params);

    List<Map<String, Integer>> connectTypes(Integer procId);

    List<Map<String, Object>> tableTypes(Integer procId);

    List<Map<String, String>> jobAlerts(Integer procId);

    List<Map<String, Object>> last1Hour(Integer procId);

    List<Map<String, Object>> last6Hour(Integer procId);

    List<Map<String, Object>> last1Day(Integer procId);

    List<Map<String, Object>> last1Week(Integer procId);

    List<Map<String, Object>> last1Month(Integer procId);
    /**查询项目创建人列表*/
    List<Map<String, String>> userList(Map<String, Object> params);
    Integer userListCount(Map<String, Object> params);
    List<ProcInfo> selectListByIds(@Param("allProcList") List<Integer> allProcList);

    List<ProcInfo> listUserProcs(@Param("userId") Long userId, @Param("tenantId")Integer tenantId);

    void projectList();

    ProcInfo selectAndQueueNameById(@Param("procId")Integer procId);

    List<ProcInfo> listProcs(@Param("tenantId")Integer tenantId, @Param("procIds")Set<Integer> procIds);

    List<String> getPackUrls(@Param("procId") int procId);

    String getByJobId(@Param("jobInfoId") Integer jobInfoId);
}
